Convert base.coffee to JS.

Is there any point in having these private functions that just create objects?