Added a toggle button for the preview