Schema exporting as plugins

In this pull request I have converted the existing schema export code to new schema export plugins