Implement command line parser. #409