added system identification code, cleanup