Remove obsolete files.
Add system state calculation.