Added clean up function run when page ready