Feature/spark op local architecture

Local operations implemented in the spark directory, fully tested.