tests for command and param parsing plus fixes unearthed