Moved everything plugin related over to a class to get more structure

Still needs correct documentation