Removed old unused code
Moved fitttext and flushtextbuffer to io module
Removed unused code
Rewrote colour-handling code