Initial implementation of environments and continued implementation of modes.