First commit - major changes to initial fork to control switches