cleanup and structure