Started work on the rules engine.