continuing with global.js, fleshing out the oojs framework