Move part of book code to mantle