Updated for better JSLint conformance