Change Stack to use Queue as prototype and reuse code