#4 Implemented preview and edit mode.