Graphics rewrite

Pretty functional rewrite of graphics. Penumbra is still not fully factored out.