Added some JS best practices stuff.