Updated to pass stricter JS Hint requirements