Accumulators unused vars branch

This gets rid of an ublas dependence and of unused vars that clutter up the code. Please check if OK.