Reworked Ding-related code. Still tweaking.

Signed-off-by: William Raiford <bill.mybiz@gmail.com>