Added initial word cleaning logic