Remove unnecessary anonymous functions

While at it, fix a few whitespace issues.