refactor startup scripts (use variables)