Slowly but surely coming to completion of newmodel.

Frankly I can't find more things that need to be fixed.
I'll have to test it a bit and fix as i go along though it might be ready to be merged with master.
Must take care of all the todo comments lying around the code.