The car was filthy when he returned it to me, and 'to cap it off' [='to top it off'], there was almost no fuel left in the tank.
a 'shower/bathing cap' [=a head covering that people wear to keep their hair dry when they are showering/swimming]
They may not like being called careless, but 'if the cap fits, wear it'. [=('US') 'if the shoe fits, wear it']
(..) It's all here, conclusive proof. You invented James Moriarty, your nemesis. Invented him?! Mm-hm. He invented all the crimes, actually. And to cap it all, he made up a master villain. Don't be ridiculous! Ask him. He's right here. Just ask him. Tell him, Richard. For God's sake, (..)2012 TvShow: Sherlock Title: The Reichenbach Fall Season: 2 Episode 3
(..) Why is it always the hat photograph?! "Bachelor John Watson. " What kind of hat is it? What are they implying?! Is it a cap? Why has it got two fronts? It's a deerstalker. "Frequently seen in the company of bachelor John Watson. " What are you going to do, throw it? (..)2012 TvShow: Sherlock Title: The Reichenbach Fall Season: 2 Episode 3