Moved plot functions to the sleepModule

tested OK after move