Thanks you very much. I think I'll just put them in main() and get rid of all these problems. However I'm still interested in your alternative and I will therefore try it and see what happens.

Thank you very much for your help.