Various API cleanup.