Several small cleanups