Changes to gf.

gf() now accepts an optional initialization array.

We use this feature to initialize D, D2, X, Y, I, which previously
were untyped arrays.

Also, gf() is now called directly without "new" everywhere.