Simplified and explained complicated parts of the draw function.