More api commonjs-ification and some backbone fixes