Improve consistency of command interface
Move utility functions to Util
Adjust formatting