added data and posinfo block tests and fixed some memory problems reported by valgrind