Completed stack implementation.