Switch to Special structure for endpoints, and use a global hashmap