Making small changes to appease warnings
Refactored how parallel_invoke is checked to support multiple args and to
avoid code duplication.