Importing more code from fermi CVS.
Merging changes.