further cleanup + bug fixing
further cleanup + bug fixing