WIP #231. Added a few more methods to the CLI and tidying things up.