Refactored Rules Engine; Included test case;
Merge branch 'master' of https://github.com/jimpoulakos/petulant-bugfixes