Separated the SM class from sleepy.php