Sync up including many refactorings around config and security integration