Improved toggling and localStorage