Fix formatting; add missing function