Refactor to allow request to be either served by wbwebpage or by wbfile