Code cleanups