Improve entity generation.