Beefy refactor with the aim of easing the task of adding new APIs