Stack interface and implementation