Tracked environment

TODO: Lots of tests!