Added string formatting and truncation