Misc changes

This PR contains:
* more consistent coding style
* a minor change to replace +new Date by the fast Date.now() in throttle()

Though it should work theoretically, I couldn't run the tests, so please make sure everything is OK before merging.