Replace envdir with simpler solution