Code refactoring, add titleization support