[SPARK-1522]: Refactoring Feedback.

* Coding Style:
    * [Spark Style Guidelines](https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide)
    * [Scala Official Style Guidelines](http://docs.scala-lang.org/style/)
    * [Scalariform](https://github.com/mdr/scalariform)

* Code refactoring and cleanup per review by andrewor14

Author      : berngp
Reviewer    : andrewor14, tgravescs
Testing     : ?