Removed unused code
Refactoring