added dictionaries
Go through nodes in tree
Gets rid of ALL unwanted nodes
iterate through nodes not in tree
debugging print statements
renamed some variables
shorten code
comments