Moved the graphics stuff into a gfx module