Various changes/fixes