Stack

Added tests and removed redundant clauses.