Miscellaneous small changes/fixes