Move env spec to method. Fix #29
Some work on #67