Updated the -h option to show all options and to return the correct exit
code. Furthermore cleaned up some code.