js files broken up into smaller components and restructured