Merge pull request #1 from andreyrd/master

Added CLI functionality
1.0.1: code cleanup