Tidyied up my source to remove duplications