restructure js libs