Add implementation of the algo by Spark.
And reorgnized the folder structure.