reorganized project, took testing out of source files, wrote unit test for file write bug