use HTTP::Date instead of our own date routines
rearrange and tidy code
clean up validation, returns, and remove as_string
added docs and addressed critic errors