SPARK-1630: Incorporated code-review feedback