Changed to delete empty contentreferences on pages instead of saving them as empty.