Added some initial pieces and test code for the environment synchronization functionality