fixing check style issues
improving readability
simplifying code
improving readability
Merge pull request #345 from raghavgautam/cleanup

minor cleanup