Revised the signal and slot mechanism.