Added some better error handling. Includes a file that defines possible
exit codes.