Refactoring

To make entering new heads and bodies and body-credits as easy as
possible. Also to tidy the code up a bit.