More code cleanups