Implement page removing, add tests