Tightened up the gratuity method and  added docs

also fixed doc formatting