added back memory
fixed issue with if and recursion
fixes to make it work in new rpython