Refactoring of fast_um