Fixed bug: Not adding characters at the end of the string. Added some documentation