Pass some environments. allow further args. Fix validity test