adding additional sort conditions for DOT entries.

Direct > any check > unchecked.
cleaning up if blocks
Merge pull request #31 from dimagi/unchecked_loser

adding additional sort conditions for DOT entries.