Simplify env#namespace and add missing tests
Add env#lookup tests