Reworked web response logic