Moving heap stuff to its own file.