better parsing

try to contain memory leak (will have to dig for it later)
better tracking if canceled