Updated code to support new kind of mapping
Fixed entity name in mapping
Now calculation is correct again
Switched the mappings and fixed errors
Added a generation of the mapping table