Extracted some methods in dbscan algorithm to reduce size of the create_cluster method