Optimize order in which entities are drawn