Move API loading to it's own method so it looks nicer.