Simplified code and avoided creation of many objects