Change string formatting syntax

Make use of str.format for better flexibility and readability