Plugin dependencies

Closes #1086