When Grim says, "Oh, this sad cowboy tune really speaks to my achy breaky heart", it's a line from Billy Ray Cyrus's song "Achy Breaky Heart".
When Billy is having Bad Luck, Grim uses a Tricorder to scan Billy and it emits the familiar sounds. This is an homage to Star Trek and it's subsequent Spin-offs.