Bug fixes and MODFAC code optimization.