Add API methods from trunk