Refactored the slot imlementation code 

Already added