factored the meat of sketch.js into fogbugz.js