Miscellaneous fixes/cleanup