Move some functions to helper scripts.
Make scripts executable.