Added clean-up code