Refactor for removing preview