Add in new config variable. Polish up plugin.py a bit and refactor some code.