refactoring and removing unnecessary files