refactorying whole project