Feature/fix duplicate characters

Resolves Issues #31, #33, #34, and #46.