Modified Stack class to now store any type of objects.