Cleaned up and refactored for clarity, and added server name route stem