code cleanup
added PluginBase and BaseWindow classes which handle the basic window stuff