Further refactoring to consumer client

@spaceCamel whenever you get spare time to review