Coding HELP needed

additionally:

Your code contains a lot of functions.
Did you test each function separately?