Break up into files. Simplify code. Remove unneeded redefinition of sgiAutoform directive.