Base stack class