Added Deck class and tests. Use of optional return type.