Indent controller actions properly

Fixes #1178
Don't generate whitespace lines, fix tests
Merge branch 'master' into all-custom-error

* master:
  Don't generate whitespace lines, fix tests
  Indent controller actions properly