Issue/async requests

The comparison is screwed up. I basically added promises to support async calls. I was a quick fix, if you feel like it is a good solution, we can work together to make it prettier.