#74: add 'rules' module

Resolves #74.