Cleanup and use some variables to reduce lots of redundant calls to things like pluginManager and server