Avoid unnecessary object allocations.
Merge pull request #34 from mogotest/reduce_object_allocations

Avoid unnecessary object allocations.