fix bad option handling and remove plugin.php