recoded scipts' architecture
Closes #37