1. Relation management on A/B rule. #143

2. Relation management code refacting