Start Consumer testing; some code refactoring