Move api key to private class variable