Remove plugin.php and merge into base class

plugin.php contains a lot of old and unnecessary code