Reset code to initial state