Getting an infinite list to not go off the page