Implement the new  API. It's just a dumb statification of the  old code, ugly as hell, but it's a stub for futur work.