Fixed a few minor bugs.

Added a generic command parser.