Remove bad store global vars in metadata helper
Update lib to add some utilities to get WAC modes
Add little helper code to know if we can edit or read a pg