Made the API a little more flexible.