Add configurable radix for integer parsing, modify other methods to avoid duplicating code