Cleaned up the traversal by not taking advantage of a list reference