Attempt at properly pipelining HTTP requests
Code cleanup