Created enumeration inside MappingEvent, instead of outside.

Also, created a kind of skeleton for the mapping algorithm.