Merge pull request #11 from rzlee/master

Minor code cleanup
Merge pull request #12 from rzlee/master

Refactored code