some cleanup. working, segfault after prolonged data read