Rework plugin to remove duplicate class definitions