Refactor client-side editor code structure.