Improved safety by switching parts of code to string.format. General global TODO