Lots of fixes/changes