added get last sleep record
init varible
rename variable
clean up code

rename variable
added populate sleep patern graph