Fix various CS issues

main points:

* `function () {`
* `{"foo": "bar"}`
* trailing white spaces
* useless and/or consecutive empty lines