introduced state object for components.  cleaned up examples