Finished the xModel class.

Finished xmodel implementation. What's left is to make an ObjectWrapper
class for it so it can be controlled easier. Oh ye and also to test if
it actually works. But who needs that, right?