Rewrote module 5

Not completely happy with this. It feels like it needs a lot more, but I
am not fresh enough to do it right now