Starting to factor interfaces out of kernel into API