#382 Improved the spark computation, simplified and updated documentation.