Improve readability of functions and exit values