More behavior analysis code.