Add command line arguments and cuda support.