Adds toggle switch and other small fixes