Seems to be working! Next: add endianness detection (ugh)