little pedanteries (typos, removed unused imports, type inference)