typos and minor corrections
still haven't found the memory leak source...