Refactoring and deleted commented code