helper: Code cleanup for hexify()