Improves loading of libraries in discovery/JS