refactor, move more stuff into cruisemonkey.js