Refactoring: Exctract ResponseCodes class from Endpoint

I have nothing to say ...
Use nested module/class definitions instead of compact style.