BRANCH 4.1-DEV: pushed logic to where variable plugin actually exists