Add tests which found a bug with pop(), fixed that bug. Also found and fixed the issue explained in #60