clean up JS file, make sure we don't spew error messages for build targets that lack lessonToolbars, and restore card behavior