Added sorting to the entities that are being displayed to screen.