Add terminate, add tests for command