Improved error handling in options parser. Added -h (help flag