Big restructure and implement browserify