lots of misc changes/fixes