refactored card/deck controller
rafactored code and cleaned up html
rafactored code and cleaned up html