Code refactoring. Removed unnecessary code.