fixed at least 1 bug in the uart handling code and cleaned it up a lot
diff --git a/bbb_cape/src/bbb/cows_test.cc b/bbb_cape/src/bbb/cows_test.cc
new file mode 100644
index 0000000..06eba5b
--- /dev/null
+++ b/bbb_cape/src/bbb/cows_test.cc
@@ -0,0 +1,17 @@
+#include "cape/cows.h"
+
+#include <gtest/gtest.h>
+
+namespace testing {
+
+TEST(CowsTest, StupidZeros) {
+  static const uint8_t kTestInput[] = {0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01,
+                                       0x00};
+  uint32_t input[3];
+  memcpy(input, kTestInput, 12);
+  uint32_t output[2];
+  EXPECT_EQ(
+      1u, cows_unstuff(input, sizeof(kTestInput), output, sizeof(output) * 4));
+}
+
+}  // namespace testing