Remove unnecessary allocations flagged by lint