refactor: small refactoring and major reformating (no tabs!) in api_ums.cpp