Add a similarity calculator, modularize