Remove code duplication

Remove whitespace

Update documentation for to_uppercase, to_lowercase