Simplify number extraction method