Brett - block model generation code