Refactored the tools for generating similarity matrix.
Updated the README instruction accordingly.