Recursive asMapKey and some minor fixes