Moved http calls into service