Cleaned up some code and fixed multiple file dendro creation.