More cleanup. Reduce nesting levels.