Remove and add some debugging code