Made the API nicer.