Refactored the slot imlementation code 

Corrected