Fixed Bugs and Added Testing Code
Merge pull request #33 from starkfree/master

Fixed Bugs and Added Testing Code