Now all rules are JSON validated.

I added ValiJson library and created JSON schemas for all the rules. Granted it’s not perfect and probably missing some checks, but it’s important and i have already caught a few existing errors.