Added partial implementation of env processing