Moved all code related to deck into Deck class;
Fixed defining max_position;