structure fix; function arguments allocation added; other fixes;