refactored and deleted unused files