Update helpers.js

+ Added formatDate 

It would need momentjs included, but in its absence it returns the context.

+ Minor code syntax corrections that JSLint noticed.