Refactor: register number generation; truncated number generation;