Code cleaning and post_processing implementation