Reduce number of global variables. Document plugins separately