Add localconfig to all state functions

Abstract the opts loading to a seperate function, and check a specific kwarg
Merge pull request #15765 from jacksontj/high_root

Add localconfig to all state functions