Avoid nesting and improve syntax.