Code cleanup, fix typos.