[*]: fixed code-style and added "local" var for many scripts
[*]: fixed code-style (fix)