refactored to use webjars and requirejs