Refactored plugin, fixes and added extensions.xsd