refactored typescript classed to belong to chatty module