Cleaned bash functions with a "return" statement