Move more functionality into plugins