Further edits to rule engine. Time to test this shit