Some minor code cleanups