Finished file writing and data serialization.

Still can't read the file in correctly though.  The debugger kind of
sucks