removed the unused RuleEngine, tweaks to get rid of some warnings