Numerous bug fixes, plugin now runs without crashing.  Still need to work out problems with the profile switcher.