Clarify order of operations
Remove extraneous allocations