Added JS validation and more flags