Reduced code and improvement.