lots of fixes and updates