Validation feature: code cleanup