Stuck with program flow and freezing programm

No problem, here is the whole lot attached. However, to look at the first two attachments show the changes I made when the problems started to turn up.

And thanks again

blog_RMU_1_2_4.ino (56.5 KB)