javascript: C style cleanups