Refactor BoardIndex, rename functions.