Use the bitmask of Capacity-1 instead of modding by Capacity. This is an optimization trick since Capacity is guaranteed to be a power of two.
Remove AddFront from performance benchmarks