added new variable assignment option
various upgrades and bugfixes in applyRules