Plugin rewrite

- Added LICENSE
- Minor bugfixes