Make the code simpler and fix get response logic.