he had done unpleasant things before , however , and , although he was a bit grim about it , he nonetheless dutifully spent at least two hours a day confined in this prisonlike cell , struggling with ancient books and scrolls written in often-times difficult script .