Fix and add tests for get() and pop() methods