* move m/env to its own pkg
* fix undefined func (was renamed in previous commit)