Internal cleanup

Mostly just replaced explicit type names with `var` when applicable. No
CTRL+F used, I swear! :wink:

This was just an exercise to get me up to speed with the DMP code.