Refactor of retrieval command reply parser