General tidy up & moved httprequest parameters into their own object