code book cleanup