Fixed voting and editing cards, added more tests.