Change allocation strategy

Change allocation strategy to grow array by 2x instead of allocating for every append.