a bit more cleanup. White image now pre-computed in agent.