Several cleanups