WARNING! This is a very big and serious change to internals