RemoveDuplicateLines Function

-Pretty messy right now and hasn't been tested. I will work on improving it tomorrow.