added mulvar.php (global variables init)
bugfixed and refactored