Started rewriting with requirejs, going well.