remove unused imports, standardise import order, etc

Yes absolutely. I have to head to the dentist. I will do it when I get back, or you are welcome to. I don't really have anything else for this PR.