Convert to single function module.

Closes #20.