Added const to traversal functions since they dont modify any class members