More work on entity stuff.