Cleaned the draw function