Refactor out callbacks into echo module