move tree index underneath tree
rename env to contexts
remove dependency injection from functions files apart from when needed for environment
Also remove dep-injection from visitors, none of which use environment. make functions used as classes TitleCase