More api tweaks and more code.