Rewrote the deck database methods. Hopefully they don't get deleted
again...