Fixed up the rules forms so that they work correctly once again, and
added validations & better input handling to the rules system.