Added background threading for plugin