some work on cleaning up entity import