Started working on this. It's realy quite complicated and I don't think I'm going to mess around with it much more right now.