Correct formatting and fix a couple of import bugs.