Refactoring: scripts retrieval moved to separate function
Refactoring constants