Added constructor to every class and changed the countCards function in stack.php