more refactoring, naming fixed s.t. file variables end in the word file