Consolidate functions for getting schema elements
Add docstrings