Restructure to more minimal API