Changed Plugin to abstract class and defined a function to lookup
plugins by type.