moved examples to correct place
tweaked command line interface
added mli for global compiler
streamlined code and moved auxilliary functions to more appropriate places