Moved functions dealing with response into own file in PC.