Changes to hopefully be compatible with Plugins 3