Added clean up code