Ok, I think I've worked around all the memory bugs. Now I have algorithmic bugs to work out...