Move capitalization function to Misc