Made the stack independent from interface implementations

Change-Id: Ib9ecd3ada74824f563fe8d30c8a8cf3a7bcb0b8d