Cleaned up, added tests. Feature complete.
Merge pull request #2 from saibotsivad/master

Cleaned up, added tests. Feature complete.