Changed onload to deviceready