Refactor AbstractDocument

Be more consistently functional throughout and make the label overrides generic enough to handle any labels, not just date labels.

Also a little bit of code-style tidying (`%w` and whitespace).