Adding logic to add/toggle appliance. Moved some functions to Appliance.py