Clean up javascript code style

Be more consequent JS markup. It's differences in all files.

Maybe use node-jscs (grunt-jscs) to make it easier to write consistent markup?