Adding model

I've added a bunch of code to represent 'fragments' that come from the
gateway.