Cleanup and formatting of command line and utilities code