split responseHelper as separate file.
added phpdocs comments.