Refactor implementation and used better accessor for Endpoint configuration