Improve the Deck type, with tests this time