Working on rewriting the graphics system