Remove polling code and replace it with long http calls