HUGE refactoring of the drawing system

So it becomes platform independendant now!
Finishing refactoring.

This is still huge!