Lot of fixes and behavior changes.