Move most of the code to a separate module

...which is not very reusable yet (exitFailure et all) but an important
first step towards being able to test/benchmark the code.
Simplify boot function to get rid of some IO

I'd rather not have a library function exitFailure out below my
a...rmpits.