fixed javascript issues and bundling