Cleaned up unnecessary object allocations.