Minor modifications for CodeBook