refactor preview / edit modes