Separate functions into more logical groups

Move arithmatic functions to arith.c, all i/o into io.c, then allocating and
freeing into data.c, and endian swapping into endian.c
Merge branch 'arith_ops'

Files all nicely separated out, mostly working too.