Lots of additions including memory debug