added rules object for rule handling
Merge remote-tracking branch 'origin/master'