Added initial api connection stuff