Clean up and removal of debugging code