Some refactoring
Main changes are in previous push

Yuvaraj
yuvarajgogoi@gmail.com