Added help message generation; Improved optional arguments handling.