clean the structure