Ads some minor changes into code
Ads new module rules and entity
Merge branch 'rules'