Update D2D for the Learn breaking changes

 - Updated for the new Learn version!
 - General code clean up per PEP8

Some Notes:
 - Learn now hides the content type (yuck), so we have to do a little more work to pull it out.