Misc changes and fixes