Restored missing function from AutoDiscover
Code style and reformat