JS libraries and restructure