Added CLI package
Some refactoring and added parsing