Refactors algo determing part from updateKeyManager() into own function to use for #37