mapping configuration

Added some more logging.
Added mapping configuration to allow sorting and correct type analysis.