Moved array to getter method. Added test to check that remaining values correct when array is popped.