improved the commands
Merge pull request #1 from laxika/master

Improved command handling