Spark Local Operations

Local operations implemented in the spark directory, fully tested.