Removed some unused code
Refactoring.
Refactoring.