started the refactoring of scripts