Made several changes to match Dia specifications as per hall5714's review.

...w.