Removes unnecessary object creation code