Some framework instance/memory handling rewrites. Possiblely broken build.