Code clean-up, plus some minor fixes based on some negative tests
Merge pull request #100 from sunithamisra/master

Code clean-up, plus some minor fixes based on some negative tests