Some refactoring.
Working on figuring out how to read/write files.