javascript code convention fixes

we now use a style loosely based on crockford's conventions
jscs code style conf