All code related to sleep analysis