Moved blocks of code around to section together pieces of code I wrote that are only used in specified plugin.