CodeBook refactored