Adds missing imports and corrects all errors