Refactored the slot imlementation code 

Already done