Cleanup
Add check-leaks flag.
JSLint suggestions cleanup.
JSLint cleanup.