Clean up target and destination specifier generation and allow overriding the 'name' argument with an environment variable