Miscellaneous improvements in exposed APIs