cleaned up a bit, got rid if bit shifting, using encoding/binary now to manage endianess