Added a test for dup and pop.
Refactored one test.