various fixes; contextual mappings support