Rework some plugin stuff