Refactor: singleton design pattern - api service