Changed the design of the API.