UTF issues resolved, and repetitions removed from output