button for mode toggle + cleanup