Tidies up document controllers.
Improves tests.
Tidies up StatementController.