Refactor hexadecimal.