Miscellaneous improvements to the ORM section