refactor the cli to use optparse instead of the handcoded bit