Cleaning up the layout, optimizing code for the on/off button.