Squash most of parse_req into expandVar and expandUrl