refactor(aurelia): extract plugin logic into its own class