Moving plugin logic to another file