Fix typos and missing imports