Implemented file reading and writing. Alot general changes.