Some more code cleanups