Updated system to use a env with two hashtbl