WIP on command line processing. Minor cleanups.