Typos and missing imports fixed