more refactoring. We now only load the javascript we need.