Added graphics device refresh method
Fix drawing problem. Graphics reference not equal
Added comments to update() and draw()