Added helper functions and SPDY support