Merge newapi branch