Fix some minor typos, add missing imports