Refactoring 
Added Comments