Many bug fixes.