Command-line UI

Added simple user interface
Fixed some bugs in parser