Updated API.

Made the changes dicussed with Blair on IRC.