fix map implementation. Optimize inheritsFrom