dont hide pasteafter button
implement toggling state saving and refactore code
implement toggling state saving and refactore code