Move relicensing to plugin level

* Add valid_hash check
* Move relicensing to plugin level