updated clustering, cleaning up hash creation, bug fixes