tweaks and some productionalization