move plugins to defaultPlugins
pull plugin matching out of main program