Messagestore

@rcrichton - have a look at messagestore branch