Improved cli options handling