1. add common signal handler parts. 2. polishing CFM functions