Fix minor index bug and cleanup a few things
Add visitor to solve some recursion problems - not quite complete