Added ISO compliant date strings

Seems to have fixed remaining PostgreSQL issues
General cleanup

Added some missing semicolons to get JSHint to shut up