Refactored the slot imlementation code 

ALready corrected in a later commit