Multiple misc changes and fixes