Added additional checking for .format and fixed the test files.