Implemeneted stack pushing and popping.