Cleaning and debug