Code clean up

Removed unused and useless code 
Refactored 

Current code climate 2.4