structure cleanup & node retriever