Add Endpoint class.

Added the abstract Endpoint class. Fix output from Publisher.