#30: made all functions non-IO besides `main`
as discussed in #30.
Closes #30.