Simplify rule engine, tests all pass.

Hope you like this, had some free time.