Refactor is-even & belongs-to functions

- Closes #171