moved everything out of command line utils and into library...