Cleaned up unit attribute handling. Better email output.
Unit status flags, and unit status report.
Fixed bugs where some flags were not correctly saved. Fixed bug where tasks.csv was not correctly read.