Handle all short command line options, not just 'h' (help).
Also cleaned includes and some minor fixes.