First crack at an Environment() capable of doing substitution.

Includes unit tests.