Made new implementation of (un)capitalize

issue #580
Refactored the variables in the new wrap function

issue #580