Pass named parameters into hardness function.

Closes #142.