Refactored base service class to include failure handling code.

Added entities needed to add a post.