moved pre_geometry into pre_entity_layer.