Refactored bundling again. Put scripts in its own file which references bundler for common file manipulation. Started tests.