Make state an arument into plugins.