Merge pull request #23 from alexandru-iacob/master

Re-structure script - using functions
Merge pull request #24 from alexandru-iacob/devel

Merge pull request #23 from alexandru-iacob/master