fix tests.sh and whitespace twiddle
added another delegate and removed whitespace
fix all the env_db consumers
Merge branch 'pr11' into pr13