SPARK-1639. Tidy up some Spark on YARN code