Cleaning and debugging