Updates

Hi,

So we have just done a massive refactor of our Map type etc. So I merged it in and tested it.

I also had to swat a bug, see the diff comments.

Stuart