Refactor code and fix the cards order problem
Merge pull request #12 from jarmstrng/r_refactoring_code

R refactoring code