Refactoring

added common code like scripts folder
and used it in common place