Create parent traversal function, split out add/remove classes on parentNode