Cleanup input arguments.