Functional saftsearchenginednahash implementation

Still need optimisation
Fixed bug in d2 variance computation

Hash table is still broken