Add support for manual binding of the plugin
Merge and refactor code a bit