added sample consumer and refactored rest service