Cleanup the API to be used in 1.7 release