Simplify code based on Martin's suggestions.