Began cleanup of d0ts code. Added lots of comments. still need more