Updated api to 12 from 10 and associated changes.