Move environment into parser