better handling of unit run info, code clean up