but every once in a while , as florence sat silently in the scriptorium , his thoughts would wander and he would think impure , bestial thoughts and often would apply them to the page in front of him .