In density based algorithms, it seems that there is still duplicated code that could be tried to be moved into general methods.