Highly unestable commit, reformulaton of 2d interpolations. Some bugs regarding memory corruption