Added base classes for Switches and Triggers

Basic framework for switches and triggers.