refactored some more files