added stric to functions, created mian javascript file, removed whitespaces