Refactor CLI and bin
Merge pull request #5 from kirs/refactor-cli

Refactored CLI and bin