Cleaned up some syntax in the Javascript.