Rework to turn everything into an API.