Removed unnecessary code and few minor changes