Cleaning up previous and next links