[Radu, Andrei] big refactor, not tested yet
[Radu, Andrei] added +x modifier and moved to scripts