Fixed an important code mess

Replaced the old "skiddie" way to generate the arguments by a new structured method using a list.