Implement modulo helper. Closes #42.