Fixed various typos and missing imports