So, now the code is correct.
It was hard uploading it, the webpage complained over the size. So i had to split it in two.
And could not upload it either because of some icons used in code was not allowed, so had to remove all of them.
Because im new to the forum I'm not allowed to do changes and new posts within
30 secs and 5 mins.... A bit frustrating when noticing what went wrong with uploading the code here!
The code should be OK now. But in two parts.