Testing and improving Endpoint class