Updated onoffswitch code and styling