some more progress, struggling with uglifyjs in the browser...