Move some bash functions to independent scripts.