clean up and connect signals
Merge pull request #1822 from diegosarmentero/master

clean up and connect signals