Overhauled everything to use bitboards.