Code cleanups and comments.