updated exit code handling

Updated the handling of exit codes to utilize a hash table rather than
individual variables. This allows for better scalability and improves
our ability to easily determine our final exit code.