Remove magic from 'mod' function
Add traversal filter