Some tweaking and cleaning in the script...

I would like to thanks Vanir as i picked it from them....

Signed-off-by: Daniel <daxx4182@gmail.com>