Merging duplicate class definitions