Add a command parser and some tests for it