Extract string format functions, some code formatting