Rewritten matching game using object-oriented JS and CSS