Added httpctrl tests and a few fixes