Add toggles just before they are needed instead of on page load