Error fixes and a few changes.