Cleaned up based on suggestions in the code review
Merge pull request #23 from rsingla92/CleanUpAlgorithm

Cleaned up based on suggestions in the code review