Move API into own Factory