Code clean up, added response type tests