Code review: some cleanups