More API additions and fixes.