Refactored routing into Docs object