more cleanup up of build files + indentation
diff --git a/aos/atom_code/input/input.gyp b/aos/atom_code/input/input.gyp
index e77fc47..25ef4b9 100644
--- a/aos/atom_code/input/input.gyp
+++ b/aos/atom_code/input/input.gyp
@@ -8,6 +8,7 @@
       ],
       'dependencies': [
         '<(AOS)/common/messages/messages.gyp:aos_queues',
+        '<(AOS)/common/network/network.gyp:socket',
       ]
     },
   ],
diff --git a/aos/atom_code/output/output.gyp b/aos/atom_code/output/output.gyp
index d41fe7d..9e264d5 100644
--- a/aos/atom_code/output/output.gyp
+++ b/aos/atom_code/output/output.gyp
@@ -27,10 +27,10 @@
         'MotorOutput.cpp',
       ],
       'dependencies': [
-        '<(AOS)/build/aos.gyp:libaos',
+        '<(AOS)/common/network/network.gyp:socket',
       ],
       'export_dependent_settings': [
-        '<(AOS)/build/aos.gyp:libaos',
+        '<(AOS)/common/network/network.gyp:socket',
       ],
     },
   ],
diff --git a/aos/build/aos.gyp b/aos/build/aos.gyp
index 84a6271..7d570fd 100644
--- a/aos/build/aos.gyp
+++ b/aos/build/aos.gyp
@@ -32,6 +32,8 @@
           ],
           'dependencies': [
             '<(EXTERNALS):WPILib',
+            # TODO(brians): socket should only depend on the interface
+            #'<(AOS)/common/network/network.gyp:socket',
           ]
         }, {
           'sources': [
@@ -69,6 +71,32 @@
       'includes': ['../build/swig.gypi'],
     },
     {
+      'target_name': 'aos_core',
+      'type': 'static_library',
+      'sources': [
+        #'<(AOS)/aos_core.h'
+      ],
+      'conditions': [
+        ['OS=="atom"', {
+          'dependencies': [
+            '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib',
+            '<(AOS)/atom_code/atom_code.gyp:init',
+          ],
+          'export_dependent_settings': [
+            '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib',
+            '<(AOS)/atom_code/atom_code.gyp:init',
+          ],
+        }, {
+          'dependencies': [
+            '<(EXTERNALS):WPILib',
+          ],
+          'export_dependent_settings': [
+            '<(EXTERNALS):WPILib',
+          ],
+        }]
+      ],
+    },
+    {
       'target_name': 'libaos',
       'type': 'static_library',
       'sources': ['<@(libaos_source_files)'],
diff --git a/aos/common/input/SensorInput-tmpl.h b/aos/common/input/SensorInput-tmpl.h
index e92a923..667d2e8 100644
--- a/aos/common/input/SensorInput-tmpl.h
+++ b/aos/common/input/SensorInput-tmpl.h
@@ -1,8 +1,8 @@
-#include "aos/common/input/SensorInput.h"
 #ifndef __VXWORKS__
 #include "aos/common/network/ReceiveSocket.h"
 #include "aos/common/Configuration.h"
 #endif
+#include "aos/common/logging/logging.h"
 
 namespace aos {
 
diff --git a/aos/common/input/SensorInput.h b/aos/common/input/SensorInput.h
index 7f8eaa7..fa99bab 100644
--- a/aos/common/input/SensorInput.h
+++ b/aos/common/input/SensorInput.h
@@ -1,7 +1,6 @@
 #ifndef AOS_INPUT_SENSOR_INPUT_H_
 #define AOS_INPUT_SENSOR_INPUT_H_
 
-#include "aos/aos_core.h"
 #ifdef __VXWORKS__
 #include <vector>
 #include <semLib.h>
diff --git a/aos/common/input/input.gyp b/aos/common/input/input.gyp
new file mode 100644
index 0000000..0a77075
--- /dev/null
+++ b/aos/common/input/input.gyp
@@ -0,0 +1,19 @@
+{
+  'targets': [
+    {
+      'target_name': 'sensor_input',
+      'type': 'static_library',
+      'sources': [
+        #'SensorInput-tmpl.h',
+      ],
+      'dependencies': [
+        '<(AOS)/common/network/network.gyp:socket',
+        '<(AOS)/build/aos.gyp:logging',
+      ],
+      'export_dependent_settings': [
+        '<(AOS)/common/network/network.gyp:socket',
+        '<(AOS)/build/aos.gyp:logging',
+      ],
+    },
+  ],
+}
diff --git a/aos/common/logging/logging.gyp b/aos/common/logging/logging.gyp
index 52d2527..b6b339a 100644
--- a/aos/common/logging/logging.gyp
+++ b/aos/common/logging/logging.gyp
@@ -8,7 +8,7 @@
       ],
       'dependencies': [
         '<(EXTERNALS):gtest',
-        '<(AOS)/build/aos.gyp:libaos',
+        '<(AOS)/build/aos.gyp:logging',
       ],
     },
   ],
diff --git a/aos/common/network/ReceiveSocket.cpp b/aos/common/network/ReceiveSocket.cpp
index 671f966..c754f32 100644
--- a/aos/common/network/ReceiveSocket.cpp
+++ b/aos/common/network/ReceiveSocket.cpp
@@ -19,12 +19,12 @@
     return ret;
   }
 
-	if (bind(socket_, &addr_.addr,
+  if (bind(socket_, &addr_.addr,
            sizeof(addr_)) == -1) {
     LOG(ERROR, "failed to bind to address '%s' because of %d: %s\n", localhost,
         errno, strerror(errno));
     return last_ret_ = -1;
-	}
+  }
   return last_ret_ = 0;
 }
 
diff --git a/aos/common/network/ReceiveSocket.h b/aos/common/network/ReceiveSocket.h
index bd834c9..468cb22 100644
--- a/aos/common/network/ReceiveSocket.h
+++ b/aos/common/network/ReceiveSocket.h
@@ -7,11 +7,8 @@
 
 class ReceiveSocket : public Socket {
  public:
-	inline ReceiveSocket(NetworkPort port) { Connect(port); }
+  inline ReceiveSocket(NetworkPort port) { Connect(port); }
   int Connect(NetworkPort port);
-
-  inline int Recv(void *buf, int length) { return Socket::Recv(buf, length); }
-  inline int Recv(void *buf, int length, long usec) { return Socket::Recv(buf, length, usec); }
 };
 
 } // namespace aos
diff --git a/aos/common/network/SendSocket.cpp b/aos/common/network/SendSocket.cpp
index 89665dc..78aca79 100644
--- a/aos/common/network/SendSocket.cpp
+++ b/aos/common/network/SendSocket.cpp
@@ -18,24 +18,24 @@
     return ret;
   }
 
-	if (connect(socket_, &addr_.addr,
+  if (connect(socket_, &addr_.addr,
               sizeof(addr_)) < 0) {
     LOG(ERROR, "couldn't connect to ip '%s' because of %d: %s\n", robot_ip,
         errno, strerror(errno));
     last_ret_ = 1;
   }
 
-	hold_msg_len_ = 0;
+  hold_msg_len_ = 0;
   return last_ret_ = 0;
 }
 
 int SendSocket::SendHoldMsg() {
-	if (hold_msg_len_ > 0) {
-		int val = Send(hold_msg_, hold_msg_len_);
-		hold_msg_len_ = 0;
-		return val;
-	}
-	return -1;
+  if (hold_msg_len_ > 0) {
+    int val = Send(hold_msg_, hold_msg_len_);
+    hold_msg_len_ = 0;
+    return val;
+  }
+  return -1;
 }
 
 } // namespace aos
diff --git a/aos/common/network/SendSocket.h b/aos/common/network/SendSocket.h
index 6d3feb1..27021e0 100644
--- a/aos/common/network/SendSocket.h
+++ b/aos/common/network/SendSocket.h
@@ -7,19 +7,18 @@
 
 class SendSocket : public Socket {
  public:
-	//inline int Send(const void *buf, int length) { return Socket::Send(buf, length); }
   // Connect must be called before use.
   SendSocket() {}
   // Calls Connect automatically.
-	SendSocket(NetworkPort port, const char *robot_ip) {
+  SendSocket(NetworkPort port, const char *robot_ip) {
     Connect(port, robot_ip);
   }
-	int Connect(NetworkPort port, const char *robot_ip, int type = SOCK_DGRAM);
+  int Connect(NetworkPort port, const char *robot_ip, int type = SOCK_DGRAM);
 
   static const size_t MAX_MSG = 4096;
-	char hold_msg_[MAX_MSG];
-	size_t hold_msg_len_;
-	int SendHoldMsg();
+  char hold_msg_[MAX_MSG];
+  size_t hold_msg_len_;
+  int SendHoldMsg();
 };
 
 } // namespace aos
diff --git a/aos/common/network/Socket.cpp b/aos/common/network/Socket.cpp
index b01bcb8..1ffc775 100644
--- a/aos/common/network/Socket.cpp
+++ b/aos/common/network/Socket.cpp
@@ -3,37 +3,38 @@
 #include <string.h>
 #include <errno.h>
 
-#include "aos/aos_core.h"
+#include "aos/common/logging/logging.h"
 #include "aos/common/network/SocketLibraries.h"
 
 namespace aos {
 
 int Socket::Connect(NetworkPort port, const char *address, int type) {
   last_ret_ = 0;
-	if ((socket_ = socket(AF_INET, type, 0)) < 0) {
-    LOG(ERROR, "failed to create socket because of %d: %s\n", errno, strerror(errno));
+  if ((socket_ = socket(AF_INET, type, 0)) < 0) {
+    LOG(ERROR, "failed to create socket because of %d: %s\n",
+        errno, strerror(errno));
     return last_ret_ = 1;
-	}
+  }
 
-	memset(&addr_, 0, sizeof(addr_));
-	addr_.in.sin_family = AF_INET;
+  memset(&addr_, 0, sizeof(addr_));
+  addr_.in.sin_family = AF_INET;
   addr_.in.sin_port = htons(static_cast<uint16_t>(port));
 #ifndef __VXWORKS__
   const int failure_return = 0;
 #else
   const int failure_return = -1;
 #endif
-	if (inet_aton(lame_unconst(address), &addr_.in.sin_addr) == failure_return) {
-		LOG(ERROR, "Invalid IP address '%s' because of %d: %s\n", address,
+  if (inet_aton(lame_unconst(address), &addr_.in.sin_addr) == failure_return) {
+    LOG(ERROR, "Invalid IP address '%s' because of %d: %s\n", address,
         errno, strerror(errno));
     return last_ret_ = -1;
-	}
+  }
 
   return last_ret_ = 0;
 }
 Socket::Socket() : socket_(-1), last_ret_(2) {}
 Socket::~Socket() {
-	close(socket_);
+  close(socket_);
 }
 
 void Socket::Reset() {
@@ -45,7 +46,7 @@
 }
 
 int Socket::Recv(void *buf, int length) {
-	const int ret = recv(socket_, static_cast<char *>(buf), length, 0);
+  const int ret = recv(socket_, static_cast<char *>(buf), length, 0);
   last_ret_ = (ret == -1) ? -1 : 0;
   return ret;
 }
@@ -67,11 +68,10 @@
 	}
 }
 int Socket::Send(const void *buf, int length) {
-	const int ret = write(socket_,
+  const int ret = write(socket_,
                         lame_unconst(static_cast<const char *>(buf)), length);
-  //const int ret = length;
   last_ret_ = (ret == -1) ? -1 : 0;
   return ret;
 }
 
-} // namespace aos
+}  // namespace aos
diff --git a/aos/common/network/Socket.h b/aos/common/network/Socket.h
index ceee754..b6d2c70 100644
--- a/aos/common/network/Socket.h
+++ b/aos/common/network/Socket.h
@@ -1,5 +1,5 @@
-#ifndef AOS_NETWORK_SOCKET_H_
-#define AOS_NETWORK_SOCKET_H_
+#ifndef AOS_COMMON_NETWORK_SOCKET_H_
+#define AOS_COMMON_NETWORK_SOCKET_H_
 
 #include <sys/socket.h>
 #include <sys/types.h>
@@ -8,7 +8,9 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
+
 #include "aos/common/Configuration.h"
+#include "aos/common/time.h"
 
 namespace aos {
 
@@ -27,16 +29,15 @@
   // Resets socket_ and last_ret_.
   void Reset();
 
-	union {
+  union {
     sockaddr_in in;
     sockaddr addr;
   } addr_; // filled in by Connect
 
-	int socket_;
+  int socket_;
   int last_ret_;
 };
 
-} // namespace aos
+}  // namespace aos
 
-#endif
-
+#endif  // AOS_COMMON_NETWORK_SOCKET_H_
diff --git a/aos/common/network/network.gyp b/aos/common/network/network.gyp
index ca3e653..a41509d 100644
--- a/aos/common/network/network.gyp
+++ b/aos/common/network/network.gyp
@@ -47,9 +47,11 @@
       ],
       'dependencies': [
         '<(AOS)/build/aos.gyp:logging',
+        '<(AOS)/common/common.gyp:time',
       ],
       'export_dependent_settings': [
         '<(AOS)/build/aos.gyp:logging',
+        '<(AOS)/common/common.gyp:time',
       ],
     },
   ],
diff --git a/aos/crio/controls/controls.gyp b/aos/crio/controls/controls.gyp
index 2dd7098..626cb89 100644
--- a/aos/crio/controls/controls.gyp
+++ b/aos/crio/controls/controls.gyp
@@ -13,6 +13,7 @@
         '<(AOS)/common/common.gyp:common',
         '<(AOS)/crio/motor_server/motor_server.gyp:CRIOControlLoopRunner',
         '<(AOS)/crio/motor_server/motor_server.gyp:MotorServer',
+        '<(AOS)/common/network/network.gyp:socket',
       ],
       'export_dependent_settings': [
         '<(EXTERNALS):WPILib',
diff --git a/aos/crio/motor_server/motor_server.gyp b/aos/crio/motor_server/motor_server.gyp
index 01f5353..557dccb 100644
--- a/aos/crio/motor_server/motor_server.gyp
+++ b/aos/crio/motor_server/motor_server.gyp
@@ -36,11 +36,13 @@
         '<(EXTERNALS):WPILib',
         '<(AOS)/common/network/network.gyp:socket',
         '<(AOS)/common/common.gyp:common',
+        '<(AOS)/common/input/input.gyp:sensor_input',
       ],
       'export_dependent_settings': [
         '<(EXTERNALS):WPILib',
         '<(AOS)/common/network/network.gyp:socket',
         '<(AOS)/common/common.gyp:common',
+        '<(AOS)/common/input/input.gyp:sensor_input',
       ],
     },
     {
@@ -58,6 +60,7 @@
         'CRIOControlLoopRunner',
         '<(AOS)/crio/shared_libs/shared_libs.gyp:ByteBuffer',
         'output',
+        '<(AOS)/common/network/network.gyp:socket',
       ],
       'export_dependent_settings': [
         '<(EXTERNALS):WPILib',
@@ -67,6 +70,7 @@
         '<(AOS)/common/network/network.gyp:socket',
         'CRIOControlLoopRunner',
         '<(AOS)/crio/shared_libs/shared_libs.gyp:ByteBuffer',
+        '<(AOS)/common/network/network.gyp:socket',
       ],
     },
   ],
diff --git a/frc971/input/SensorReader.cc b/frc971/input/SensorReader.cc
index fd14df4..aed0818 100644
--- a/frc971/input/SensorReader.cc
+++ b/frc971/input/SensorReader.cc
@@ -2,7 +2,6 @@
 
 #include <arpa/inet.h>
 
-#include "aos/aos_core.h"
 #include "aos/common/inttypes.h"
 #include "aos/common/input/SensorInput.h"
 
diff --git a/frc971/input/input.gyp b/frc971/input/input.gyp
index 2abeac8..99bbb3e 100644
--- a/frc971/input/input.gyp
+++ b/frc971/input/input.gyp
@@ -8,7 +8,6 @@
         'header_path': 'frc971/input',
       },
       'dependencies': [
-        '<(AOS)/build/aos.gyp:libaos',
         '<(AOS)/common/common.gyp:controls',
       ],
       'includes': ['../../aos/build/queues.gypi'],
@@ -20,9 +19,7 @@
         'JoystickReader.cc',
       ],
       'dependencies': [
-        '<(AOS)/build/aos.gyp:libaos',
         '<(AOS)/atom_code/input/input.gyp:joystick',
-        '<(AOS)/common/network/network.gyp:socket',
         'actions',
         '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
         '<(DEPTH)/frc971/queues/queues.gyp:queues',
@@ -36,10 +33,10 @@
         'SensorReader.cc',
       ],
       'dependencies': [
-        '<(AOS)/build/aos.gyp:libaos',
         '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
         '<(DEPTH)/frc971/queues/queues.gyp:queues',
-        '<(AOS)/common/network/network.gyp:socket',
+        '<(AOS)/common/input/input.gyp:sensor_input',
+        '<(AOS)/build/aos.gyp:aos_core',
       ],
       'conditions': [
         ['OS!="crio"', {
@@ -59,7 +56,6 @@
         '<(AOS)/build/aos.gyp:libaos',
         '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
         '<(AOS)/crio/shared_libs/shared_libs.gyp:interrupt_notifier',
-        '<(AOS)/crio/shared_libs/shared_libs.gyp:limit_encoder_reader',
       ],
     },
     {
diff --git a/frc971/output/SensorSender.cc b/frc971/output/SensorSender.cc
index e2d2e51..105088d 100644
--- a/frc971/output/SensorSender.cc
+++ b/frc971/output/SensorSender.cc
@@ -1,5 +1,6 @@
 #include "aos/crio/motor_server/SensorSender.h"
+#include "aos/aos_core.h"
+
 #include "frc971/queues/sensor_values.h"
 
 AOS_RUN_FORK(aos::SensorSender<frc971::sensor_values>, "971SS", 100)
-
diff --git a/frc971/output/output.gyp b/frc971/output/output.gyp
index 780eadf..42bfe94 100644
--- a/frc971/output/output.gyp
+++ b/frc971/output/output.gyp
@@ -32,6 +32,7 @@
               '<(AOS)/atom_code/output/output.gyp:motor_output',
               '<(AOS)/atom_code/messages/messages.gyp:messages',
               '<(AOS)/atom_code/atom_code.gyp:init',
+              '<(AOS)/common/network/network.gyp:socket',
             ],
           }, {
             'sources': ['CRIOMotorWriter.cc'],
@@ -43,7 +44,6 @@
         '<(AOS)/common/common.gyp:controls',
         '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
         '<(DEPTH)/frc971/queues/queues.gyp:queues',
-        '<(AOS)/common/network/network.gyp:socket',
       ],
     },
     {
@@ -54,7 +54,6 @@
       ],
       'dependencies': [
         '<(AOS)/build/aos.gyp:libaos',
-        '<(AOS)/common/network/network.gyp:socket',
       ],
     },
   ],
diff --git a/frc971/queues/queues.gyp b/frc971/queues/queues.gyp
index 6219db2..70ed873 100644
--- a/frc971/queues/queues.gyp
+++ b/frc971/queues/queues.gyp
@@ -3,7 +3,6 @@
     'queue_files': [
       'GyroAngle.q',
       'Piston.q',
-      'Temp.q',
     ]
   },
   'targets': [