Plugin Split

Split parts of the plugin into their own classes in order to make the
code more readable and provide a little more modularity.