Make sure input gets sanitized in all cases & improve CS