More stuff

Hey Mate,

Here's quite a few bug fixes.  More to follow tomorrow.

D