First cut.

Need to tidy up use of ENV vars for CMD options