lots of fixes and tweaks