Various misc changes/fixes