Significant rewrite for better conditional request support