refactoring.... now it is ready to apply the Frame DBScan.