created a base class for all UI elements.