bug fixes and improvements
Merge pull request #16 from Kajakaran/master

bug fixes and improvements