Code not Loaded in Code Panel

Also, you have multiple onReady() functions in your code which is not correct and can lead to unexpected results. Consolidate all of the code in one onReady() function.