progress, fixed some problems, getting ready for cli interface implementation