Redesigned board generation (with associated functions) and added assertion "contracts".