refactor code remove unused files