lots of bug fixes - properly using config now, cli still has problems