added coderef_rule to TaxRule + more fixes and tests