Peep update

This isn't finished but I don't think I will be able to work on it too much over the next few weeks so thought I might as well put it up for merging in. As far as I can tell it all works fine.