Refactoring rule testing
Implementing rules
deletes dead code
Merge