Cleanup handling of local shell functions

Also add some more documentation about the shell environment.
Update version history for v0.8