Add function to list all defs in an environment.
Code tidying.
Increase readability of converted teslo code.