Move to webpack and commonjs