Major cleanup of code

- Rmoved unused code
* Fixed typos in config.yml
+ Added permissions in the plugin.yml
* Moved the check for config and check for opt-out code to diffrent
methods
* Cleanup in code
* Fixed typo in onEnable() + onDisable()