Refactored and commented client responder. Bug fix in responder