Cleaned up Ram's code. Moved SparkContext.remove to RDD.unpersist.

Also updated unit tests to make sure they are properly testing for
concurrency.