Added time benchmark, fixed buffer not being cleared up