tightened javascript code policy.
minor cleanup.