Improved the GraphicsEntity and GraphicsFactory structure