cleanup generation
change BMS state definition