Added init() method to API.