Making Api into a singleton