Refactor #titleize and add some helpers related to it