Fix jshint issues
Add newlines
Simplify filter.
Be consistent with anonymous functions.