make unique to prevent tests failing
refactored command trait
small tidy up