Cleaned version for CodeBook