Fixed some references and wrote some stuff on internalising the collapsibility optimisation.