refactor Response parsing and move stuff to common/