remove while loop to walk up the element tree parent nodes until we find a ceci-element
Merge pull request #1615 from ScottDowne/loops

add loop to event loop instead of function loop this way it doesn't hold...