Generalized mapping functions

@ipa-fmw: Important update