Removed unused code. 
Changes to match Spark coding style.