code refactored
refactored the code. Added more meaningful comments
Merge pull request #93 from sajinidesilva/refactor

Refactor