changed parse_command_line() function, refactored code, updated comments