minor refactoring, added rule handler, create rules, add test models file