cleaned up files, fixed problems with files truncating. TODO: polish frontend