fixes to main wrapper
more wrapper tweaks