Refactor command line options