How do I get rid of duplication

Okay, code has been documented. Let me know if I need to add more.

Thanks,

Mandy