Refactored the slot imlementation code 

debug?