API cleanups and other assorted changes