restructuring, api updates