updated plugin to work in a more production ready manner.