Split `Rule` class into separate file