Restructured namespaces

Namespaces restructured to decouple the working date functions from the
more general rest.