Make Env a proper datatype