Converted base plugin file to be a class. Added logging.