Refactor this a little to use less http requests and be faster.