Added tests and runner, tidied up ac command