Simplify code, clarify comments.