Rewrote multithreading, cardList, and similarity.