Proofreading (remove unecessary imports, improve typechecking).