Removing unused code
Improving code