Simplified functions; covers multiple hosts
Split http_request.js into factories
added stuff