Canonicalize imports.
Add final keywords where appropriate.