Creates getNextShape() and getPrevShape().
Some improvement.