Cleaning up code
Merge pull request #50 from alanlee35/bugs

Cleaning up code