Change format method to public.
Additional tests to validate the format detection function.